from ctypes import *

# 人脸框
class MRECT(Structure):
   _fields_ = [
       (u'left', c_int32),
       (u'top', c_int32),
       (u'right', c_int32),
       (u'bottom', c_int32)
   ]

# 人脸信息
class ASFFaceDataInfo(Structure):
   _fields_ = [
       ('data', c_void_p),
       ('dataSize', c_int32)
   ]

# 单人脸信息  人脸框 人脸角度 人脸信息
class ASFSingleFaceInfo(Structure):
   _fields_ = [
       ('faceRect', MRECT),
       ('faceOrient', c_int32),
       ('faceDataInfo',ASFFaceDataInfo)
   ]

# 多人脸信息
class ASFMultiFaceInfo(Structure):
   _fields_ = [
       (u'faceRect', POINTER(MRECT)),
       (u'faceOrient', POINTER(c_int32)),
       (u'faceNum', c_int32),
       (u'faceID', POINTER(c_int32)),
       (u'wearGlasses',POINTER(c_float)),
       (u'leftEyeClosed', POINTER(c_int32)),
       (u'rightEyeClosed', POINTER(c_int32)),
       (u'faceShelter', POINTER(c_int32)),
       (u'faceDataInfoList',POINTER(ASFFaceDataInfo))
    ]

# 年龄（多人脸）
class ASFAgeInfo(Structure):
   _fields_ = [
       (u'ageArray', c_void_p),
       (u'num', c_int32)
   ]

# 性别（多人）
class ASFGenderInfo(Structure):
   _fields_ = [
       (u'genderArray', c_void_p),
       (u'num', c_int32)
   ]